package com.ruoyi.project.equipment.domain;

import com.ruoyi.framework.aspectj.lang.annotation.Excels;
import com.ruoyi.project.system.domain.SysDept;
import com.ruoyi.project.system.domain.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;

import java.util.List;

/**
 * 设备信息对象 equipment
 *
 * @author ruoyi
 * @date 2020-07-03
 */
public class Equipment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设备编号 */
    private Long equipmentId;

    /** mac地址 */
    @Excel(name = "mac地址")
    private String mac;


    /** 产品id */
    @Excel(name = "产品id")
    private Long pId;

    /** 设备所属部门ID */
    @Excel(name = "设备所属部门ID")
    private Long deptId;

    /** 磁盘总容量 */
    @Excel(name = "磁盘总容量")
    private Long disktotalcapacity;

    /** 剩余电量 */
    @Excel(name = "剩余电量")
    private Long batpt;

    /** 磁盘剩余容量 */
    @Excel(name = "磁盘剩余容量")
    private Long disksurpluscapacity;

    /** 是否有本地记录 */
    @Excel(name = "是否有本地记录")
    private String hasfile;

    /** 采样率 */
    @Excel(name = "采样率")
    private Long samplerate;

    /** 网络延迟 */
    @Excel(name = "网络延迟")
    private Long netdelay;

    /** 设备状态（0正常 1停用） */
    @Excel(name = "设备状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 部门对象 */
    @Excels({
            @Excel(name = "部门名称", targetAttr = "deptName", type = Excel.Type.EXPORT),
            @Excel(name = "部门负责人", targetAttr = "leader", type = Excel.Type.EXPORT)
    })
    private SysDept dept;

    /** 产品对象 */
    @Excels({
            @Excel(name = "产品类别", targetAttr = "pClass", type = Excel.Type.EXPORT),
            @Excel(name = "产品描述", targetAttr = "detail", type = Excel.Type.EXPORT)
    })
    private Product product;

    /** 用户对象 */
    private List<SysUser> user;

    /** 用户编号组 */
    private Long[] userIds;

    public void setId(Long equipmentId)
    {
        this.equipmentId = equipmentId;
    }

    public Long getId()
    {
        return equipmentId;
    }
    public void setMac(String mac)
    {
        this.mac = mac;
    }

    public String getMac()
    {
        return mac;
    }
    public void setpId(Long pId)
    {
        this.pId = pId;
    }

    public Long getpId()
    {
        return pId;
    }
    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getDeptId()
    {
        return deptId;
    }
    public void setDisktotalcapacity(Long disktotalcapacity)
    {
        this.disktotalcapacity = disktotalcapacity;
    }

    public Long getDisktotalcapacity()
    {
        return disktotalcapacity;
    }
    public void setBatpt(Long batpt)
    {
        this.batpt = batpt;
    }

    public Long getBatpt()
    {
        return batpt;
    }
    public void setDisksurpluscapacity(Long disksurpluscapacity)
    {
        this.disksurpluscapacity = disksurpluscapacity;
    }

    public Long getDisksurpluscapacity()
    {
        return disksurpluscapacity;
    }
    public void setHasfile(String hasfile)
    {
        this.hasfile = hasfile;
    }

    public String getHasfile()
    {
        return hasfile;
    }
    public void setSamplerate(Long samplerate)
    {
        this.samplerate = samplerate;
    }

    public Long getSamplerate()
    {
        return samplerate;
    }
    public void setNetdelay(Long netdelay)
    {
        this.netdelay = netdelay;
    }

    public Long getNetdelay()
    {
        return netdelay;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    /**部门类的get 与set方法重写 */
    public SysDept getDept()
    {
        return dept;
    }
    public void setDept(SysDept dept)
    {
        this.dept = dept;
    }
    /**产品类的get与set方法重写*/
    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }
    /**用户类的get与set方法重写**/
    public List<SysUser> getUsers() {
        return user;
    }

    public void setUsers(List<SysUser> user) {
        this.user = user;
    }

    /**用户编号组的get与set方法重写**/
    public Long[] getUserIds() {
        return userIds;
    }

    public void setUserIds(Long[] userIds) {
        this.userIds = userIds;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("equipmentID", getId())
                .append("mac", getMac())
                .append("pId", getpId())
                .append("deptId", getDeptId())
                .append("disktotalcapacity", getDisktotalcapacity())
                .append("batpt", getBatpt())
                .append("disksurpluscapacity", getDisksurpluscapacity())
                .append("hasfile", getHasfile())
                .append("samplerate", getSamplerate())
                .append("netdelay", getNetdelay())
                .append("status", getStatus())
                .append("dept", getDept())
                .append("product",getProduct())
                .toString();
    }
}